import Vue from 'vue'
import Vuex from 'Vuex'
Vue.use(Vuex);

//容错 方式用户禁用本地存储
    try{
        var curcity = localStorage.getItem('fiexcity') ? localStorage.getItem('fiexcity') : '昌吉';
    }catch(err){
        console.log(err)
    }

export default new Vuex.Store({
    state:{
        currcity:curcity
    },
    mutations:{
        ctyclick(state,value){
            state.currcity = value;
        }
    }
});